![]() |
PATH![]() |
![]() ![]() |
The following are examples of AppleScript operations and their values. The value of each operation is listed following the comment characters ( -- ).
3 + 4 --value: 7
(12 > 4) and (12 = 4) --value: false
Each operation contains an operator. The plus sign ( + ) in the first expression, as well as the greater than symbol ( > ), the equal symbol ( = ) symbol, and the word and in the second expression, are operators. Operators transform values or pairs of values into other values. Operators that operate on two values are called binary operators. Operators that operate on a single value are known as unary operators. Expressions contains a complete list of the operators AppleScript supports and the rules for using them.
You can use operations within AppleScript statements, such as:
tell application "Finder"
open folder (3 + 2) of startup disk
end tell
When you run this script, AppleScript evaluates the expression ( 3 + 2) and uses the result to tell the Finder which folder to open.